#include "../pub/syscalllib.h"
#include "../pub/utils.h"

#include <string.h>
#include <stdio.h>
#define __NR_xby_printk 1203

static int debug_printf(const char *fmt, ...)
{
	int ret, len;
	char buf[1024];
	va_list ap;

	memset(buf, 0, 1024);
	va_start(ap, fmt);
	len = vsnprintf(buf, INT_MAX, fmt, ap);
	buf[len] = 0;
	va_end(ap);
	ret = syscall_intface2(__NR_xby_printk, (long)buf, len);

	return 0;
}

int main(void)
{
	debug_printf("uapp[%ld] hello world!\n", ugetpid());
	return 0;
}
